HAL ICACHE types migration

This section provides information about the HAL ICACHE types migration .

HAL ICACHE state type definition

In HAL1, the ICACHE HAL used a structure named ICACHE_RegionConfigTypeDef to configure the regions for memory remapping. This structure included fields for base address, remap address, size, traffic route, and output burst type.

In HAL2, the structure has been updated and renamed to hal_icache_region_config_t. The field names have been changed to follow a consistent naming convention, and specific enumerations are used for the size, master port, and output burst type to enhance type safety and clarity.

HAL1

HAL2

typedef struct
{
  uint32_t BaseAddress;
  uint32_t RemapAddress;
  uint32_t Size;
  uint32_t TrafficRoute;
  uint32_t OutputBurstType;
} ICACHE_RegionConfigTypeDef;
typedef struct
{
  uint32_t base_address;
  uint32_t remap_address;
  hal_icache_region_size_t size;
  hal_icache_master_port_t master_port;
  hal_icache_region_burst_t output_burst;
} hal_icache_region_config_t;

Related concept: Replaced TypeDef suffix with _t in type names